<?php

class Gallery_Backend_Photos_Delete extends Backend_Component_Delete 
{
    
    /**
     * Delete record.
     *
     * @return  boolean
     */
    protected function _delete() 
    {
        $id = (int)Application::getRequest()->get('id');
        
        Gallery_Utils::unlinkFile(Gallery_Utils::getFileName($id));
        return database::delete('photos', $id);
    }
    
}